package parts5.lesson67;

public class Demo {
    public static void main(String[] args) {
        String str="fdsaf23423rfw4324fd@#$@DF!@Fdsafsad$@#FDSFwqerwqd";
        String regex="[a-zA-Z]";
        //替换所有的英文字母
        System.out.println(str.replaceAll(regex,""));
        regex="[^a-zA-Z]";
        //只留下英文字母
        System.out.println(str.replaceAll(regex,""));
    }
}
